<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


class mysrc2 extends drasticSrcMySQL {

    protected function select(){
        $cityId=$_GET['city'];
        $city=getCity($cityId);
        $query="SELECT * FROM kiralik WHERE Sehir='".$city['name']."'";
        $res = mysql_query($query, $this->conn) or die(mysql_error());
        return ($res);
    }
}

$options = array(
        "delete_allowed" => false,
        "add_allowed" => false,
        "editablecols" => array ()
);
$src = new mysrc2($server, $user, $pw, $db, $table, $options);
?>

<div class="mainInfo" id="map1"></div>

<script type="text/javascript">
    var themap = new drasticMap('map1', {
        pathimg:"img/",
        displaycol: "No",
        addparams:"&city="+<?php echo $cityId; ?>,
        onClick: function(id){ thegrid.DefaultOnClick(id); themap.DefaultOnClick(id);}
    });
</script>